<fieldset>
    <legend>{{$legend}}</legend>

        <div class="am-form-group">
            <label class="am-u-sm-3 am-form-label">
                {!! Form::label('parent_id','上级分类') !!}
            </label>
            <div class="am-u-sm-9">
                <select name="parent_id"
                        data-am-selected="{btnWidth: '100%',  btnStyle: 'secondary', btnSize: 'sm', maxHeight: 260, searchBox: 1}">
                    <option value="0">顶级分类</option>

                    @foreach($categories as $cate)
                        <option value="{{$cate->id}}"
                        @if($cate->id == $category->parent_id) selected @endif
                        >{{$cate->name}}</option>
                    @endforeach

                </select>

{{--                {!! Form::select('parent_id', $cates, $category->parent_id, ['placeholder' => '顶级分类']) !!}--}}
            </div>
        </div>

        <div class="am-form-group">
            <label class="am-u-sm-3 am-form-label">
                {!! Form::label('name','分类名称') !!}
            </label>
            <div class="am-u-sm-9">
                {!! Form::text('name',null,['class'=>'am-input-sm','placeholder'=>'请输入分类名称']) !!}
            </div>
        </div>

        <div class="am-form-group">
            <label class="am-u-sm-3 am-form-label">
                {!! Form::label('name','缩略图') !!}
            </label>
            <div class="am-u-sm-9">
                <div class="am-form-group am-form-file">
                    <button type="button" class="am-btn am-btn-success am-btn-sm">
                        <i class="am-icon-cloud-upload" id="loading"></i> 上传新的缩略图
                    </button>
                    {!! Form::file('image_upload',['id'=>'imgae_upload']) !!}
                    {!! Form::hidden('thumb') !!}
                </div>
                <div>
                    <img src="{{$category->thumb}}" id="img_show" style="max-height: 200px;">
                </div>
            </div>
        </div>

        <hr>

        <div class="am-form-group">
            <label class="am-u-sm-3 am-form-label">
                {!! Form::label('description','描述信息') !!}
            </label>
            <div class="am-u-sm-9">
                {!! Form::textarea('description',null,['class'=>'am-input-sm','placeholder'=>'请输入描述信息']) !!}
            </div>
        </div>


        <div class="am-form-group">
            <label class="am-u-sm-3 am-form-label">
                {!! Form::label('sort_order','排序') !!}
            </label>
            <div class="am-u-sm-9">
                {!! Form::text('sort_order',null,['class'=>'am-input-sm','placeholder'=>'请输入排序']) !!}
            </div>
        </div>


        <div class="am-form-group">
            <label class="am-u-sm-3 am-form-label">
                {!! Form::label('is_show','显示在导航栏') !!}
            </label>
            <div class="am-u-sm-9">
                <label class="am-radio-inline">
                    {!! Form::radio('is_show',1,true) !!} 是
                </label>
                <label class="am-radio-inline">
                    {!! Form::radio('is_show',0) !!} 否
                </label>
            </div>
        </div>

        <div class="am-form-group">
            <div class="am-u-sm-9 am-u-sm-offset-3">
                {!! Form::submit('提交保存',['class'=>'am-btn am-btn-primary am-btn-xs']) !!}
            </div>
        </div>

</fieldset>